<template>
  <div class="app-container flex">
    <v-easy-camera ref="camera" v-model="picture"></v-easy-camera>
    <el-button @click="paiZhao">拍照</el-button>
  </div>
</template>

<script>
import EasyCamera from 'easy-vue-camera';
  export default {
    components: {
         'v-easy-camera': EasyCamera
    },
    data() {
      return {
        picture:''
      }
    },

    created() {

    },

    methods: {
      paiZhao() {
        this.$refs.camera.snap()
        console.log(this.picture);
      }
    }
  }
</script>
